package com.serviceprovider.business.module.order.valueobjects;

//~--- non-JDK imports --------------------------------------------------------

import com.serviceprovider.business.module.order.model.OrderFilter;
import com.serviceprovider.business.module.order.model.OrderFilterCondition;

//~--- JDK imports ------------------------------------------------------------

import java.util.ArrayList;
import java.util.List;

public class OrderFilterVO {
    private List<OrderFilterConditionVO> filterConditionList = new ArrayList<OrderFilterConditionVO>();
    private Integer                      id;
    private boolean                      isActive;
    private String                       name;

    public OrderFilterVO() {}

    public OrderFilterVO(OrderFilter orderFilter) {
        this.id       = orderFilter.getId();
        this.name     = orderFilter.getName();
        this.isActive = orderFilter.isActive();
        this.filterConditionList.clear();

        for (OrderFilterCondition item : orderFilter.getFilterConditionList()) {
            this.filterConditionList.add(new OrderFilterConditionVO(item));
        }
    }

    public OrderFilterVO(Integer id, String name) {
        this.id   = id;
        this.name = name;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public boolean isActive() {
        return isActive;
    }

    public void setActive(boolean active) {
        isActive = active;
    }

    public List<OrderFilterConditionVO> getFilterConditionList() {
        return filterConditionList;
    }

    public void setFilterConditionList(List<OrderFilterConditionVO> filterConditionList) {
        this.filterConditionList = filterConditionList;
    }
}



